#!/usr/bin/env bash

declare -A include_maps
include_counter=0

function include()
{
    set -e
    if [ "${include_maps[$1]}" = "" ]; then
        include_maps[$1]="$((include_counter++))"
        # echo include $1
        source $1
    fi
    set +e
}

function define_empty_function()
{
    #local funcname=$1
    #local retval=$2
    eval "
        function $1()
        {
            return ${2:-0}
        }
    "
}
